package string;

import afu.org.checkerframework.checker.igj.qual.I;
import com.google.common.base.Charsets;
import com.google.gson.annotations.Expose;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Base64;
import java.util.Date;

/**
 * @Author: ycy
 * @CreateDate: 2020/10/21 16:56
 */
public class URLString {

  @Test
  public void test7() {

//行政区
//    String innLocationAndZoneSight = getInnLocationAndZoneSight(48, "北京", true, "81727", "怀柔风景区");
//    System.out.println(innLocationAndZoneSight);

    //景点
//    IndexDoc indexDoc = new IndexDoc();
//    indexDoc.word = "大唐葡萄采摘园";
//    indexDoc.cityName = "北京";
//    indexDoc.lon = 116.7245;
//    indexDoc.lat = 39.8442;
//    // {"geoId":"678359","tujiaCityId":48,"geoType":5}
//    UrlInfo urlInfo = new UrlInfo();
//    urlInfo.tujiaCityId = 48;
//    urlInfo.geoId = "678359";
//    indexDoc.urlInfo = urlInfo;
//
//    System.out.println(getInnSightAndMarklandUrl(indexDoc, indexDoc.urlInfo));

    IndexDoc indexDoc = new IndexDoc();
    indexDoc.word = "彩带岛公园";
    indexDoc.cityName = "天津";
    indexDoc.lon = 117.6801;
    indexDoc.lat = 39.0055;
    // {"geoId":"692363","tujiaCityId":66,"geoType":5}
    UrlInfo urlInfo = new UrlInfo();
    urlInfo.tujiaCityId = 66;
    urlInfo.geoId = "692363";
    indexDoc.urlInfo = urlInfo;

    System.out.println(getInnSightAndMarklandUrl(indexDoc, indexDoc.urlInfo));

  }

  @Test
  public void test8() {
    String fromStation = "北海";
    String arriveStation = "北海环岛游";
    String date = getTodayWithSplit();
    String rnUrl = getRnUrl(String.format(SHIP_LIST_APP_URL_8230, fromStation, arriveStation));
    System.out.println(rnUrl);

    String format = String.format(SHIP_LIST_APP_URL, urlEncode(fromStation), urlEncode(arriveStation), date);
    System.out.println(format);
  }

  @Test
  public void test9() {
    double distance = getDistance(121.356807, 31.227854, 121.380864, 31.22225);
    System.out.println(distance);
  }

  @Test
  public void test10() {
    System.out.println(getRnUrl(String.format(SIHP_LIS_APP_CITY_URL_8230, urlEncode("北海"))));

    System.out.println("{\"product_sku\":[36769636280173632,36769637085480000,35956052587447200,36769643259495488,36769641380447296,35956047218738080,35956046950302624,36769635206431808,36769634937996352,35956041313158048,35956036481319840,35956038091932576,36769653191607360,36769654265349184,36769657218139200,35956035407578016,36769657486574656,36769659902493760,36769644601672768,36769648359769152,36769645138543680,36769648628204608,36769648091333696,36769646480720960,36769646749156416,36769648896640064,36769649701946432,36769651044123712,36769670639912000,36769667150251072,36769666076509248,36769667418686528,36769668223992896,36769669029299264,36769669566170176,36841346975138880,36841351806977088,36841366302491712,36841354222896192,36841356638815296,37498763467555872,37498764541297696,37498758367282208,37498760246330400,37498761320072224,37498761856943136,37498762125378592,36841371939636288,36841374355555392,37498747629863968,37498747898299424,37498757293540384,37498754072314912,37498756219798560,37498749777347616,37498750582653984,37498750851089440,35956058501415840,35956059306722208,35956059843593120,35956056353932192,36769636020126784,35956049106174880,36769640851964992,35956051790529440,35956050179916704,36769642999448640,36769642462577728,35956046958691232,35956044274336672,35956044005901216,36769633604207680,36769633872643136,35956039710933920,36769656689656896,36769656958092352,35956037026579360,36769654005302336,36769658568705088,36769658031834176,36769658837140544,36769660179317824,36769645415367744,36769647025980480,36769648368157760,35273378583543936,36769648905028672,36769670379865152,36769662058366016,36769663937414208,36841353140765760,36841343477089344,36841354751378496,36841360925393984,37498762939073568,37498763475944480,37498764818121760,37498765086557216,37498758375670816,36841385889891392,37498760254719008,37498749248865312,37498758107235360,37498754617574432,37498755959751712,37498756496622624,37498756765058080,37498757033493536,37498751664784416,35956063341642656,35956058241368992,35956060120417184,35956053946401696,36769638142444608,36769643242718272,35956052604224416,36769642437411904,36769644316460096,35956041329935264,35956044551160736,36769634921219136,36769634652783680,35273368122949760,35956040256193440,35956036498097056,36769653174830144,36769661227893824,36769657469797440,36769657738232896,36769659617281088,36769659885716544,36769644584895552,36769648342991936,35273378055061632,36769646463943744,36769645390201920,36769648074556480,35273373223223424,36769649685169216,36769650222040128,36769662838506560,36769663912248384,36769665522861120,35273355506483328,36769667401909312,36769669549392960,36769666059732032,36769666328167488,36841349374280768,36841349911151680,37498763484333088,37498762410591265,36841380781229120,36841383197148224,37498762947462176,37498764558074912,37498764826510368,37498758920930336,37498759994672160,37498760799978528,37498762410591264,36841374875649088,36841375680955456,36841378096874560,37498747646641184,37498754089092128,37498756773446688,37498757847188512,37498753820656672,35956062007853984,35956063081595808,35956058518193056,35956061202547616,35956059323499424,36769636003349568,35956053954790304,35956056907580320,36769640029881408,36769639224575040,35956054491661216,35956054760096672,36769637613962304,36769637882397760,35956053149483936,36769641103623232,36769644056413248,36769641908929600,35956049928258464,35273381016240256,36769643787977792,35956047780774816,35956044291113888,36769635734914112,36769633587430464,36769657209750592,35273368399773824,35956039459275680,36769655330702400,36769656941315136,35956035432743840,35273365983854720,36769661504717888,36769647009203264,36769651841041472,36769670363087936,36769668752475200,36841366008890432,36841357418955840,36841360103310400,37498764566463520,37498765640205344,37498761882108960,37498758392448032,37498760271496224,37498760808367136,37498764566463521,37498754902787104,37498755171222560,37498757318706208,36841393120871488,37498749802513440,37498750339384352,37498751681561632,37498753023738912,35956059801650080,36769640071824448,36769636850598976,35956056848860064,36769637387469888,36769637655905344,35956055506682784,35956056580424608,36769636045292608,36769643293049920,35956050406409120,36769641414001728,35956045037700000,35956041011168160,36769655641080896,35956037253071776,35273370555646080,36769656446387264,35956035374023584,36769658862306368,36769660204483648,36769644635227200,36769645172098112,36769645440533568,36769650272371776,36769650540807232,36769652419855424,36769670673466432,36769671210337344,36769665573192768,36769663157273664,36769663425709120,36769665304757312,36769665841628224,36769667183805504,36769668794418240,36769669331289152,36841363047711808,36841361437099072,36841379153839168,36841381838193728,37498762964239392,37498763232674848,37498764306416672,37498765648593952,37498758669272096,37498760279884832,37498761890497568,36841371100775488,37498748200289312,37498748737160224,37498748200289313,37498757863965728,37498754374304800,36841390159692864,37498750616208417,37498756253352992,37498756790223904,37498750616208416,37498751689950240,37498753032127520,37498753837433888,35956062762828704,35956063568135072,35956057662555040,35956060883780512,36769639006471232,35956057125684128,36769638738035776,36769638469600320,36769636590552128,36769644106744896,35956051756975008,36769644375180352,35956051488539552,36769643033003072,36769642764567616,35956043167040416,36769635785245760,35956036456154016,35956039140508576,36769655917904960,35956039677379488,36769654575727680,36769658602259520,36769644912051264,36769647596405824,36769645985793088,36769647059534912,36769651086066752,36769671218725952,36769669071242304,36841347470066752,36841348275373120,36841362770887744,36841369481774144,36841355791565888,37498761898886177,37498764314805280,37498761630450720,37498759751402528,37498760019837984,37498761362015264,37498761898886176,37498764314805281,37498747940242464,37498749282419744,37498749282419745,37498754919564320,37498755456435232,37498750356161568,37498752503645216,35956063308088224,35956058476250016,36769639786611776,36769636296950848,36769638175999040,36769639518176320,36769637102257216,35956049349444512,35273381309841536,36769641934095424,36769641397224512,35956047201960864,35956046665089952,36769635223209024,35956036732978080,36769654282126400,35273372183036032,35273369767116928,36769653208384576,36769658040222784,36769658845529152,36769645960627264,36769646765933632,35273377014874240,36769648644981824,36769645423756352,35273373256777856,36769649450288192,36769651597771840,36769670656689216,36769664751109184,36769665824851008,36769667435463744,35273357955956864,36769667703899200,36769668509205568,37498763517887520,37498763249452064,37498764591629344,37498764323193888,37498764860064800,37498759759791136,37498759491355680,37498760296662048,37498760565097504,37498764860064801,37498764591629345,36841398732850240,37498747680195616,37498749559243808,37498754122646560,37498755733259296,37498756807001120,37498757612307488,37498750632985632,37498753854211104,37498756807001121,35956063584912288,35956060900557728,35956060095251360,35956059826815904,35956056337154976,36769638452823104,36769642747790400,36769640331871296,36769642479354944,36769643821532224,35956048820962208,35956044257559456,35956044525994912,36769633620984896,36769653485208640,36769654290515008,36769656706434112,36769659122353216,36769659659224128,36769660196095040,36769645969015872,36769647042757696,36769648921805888,36769650800854080,36769662612014144,36769668786029632,36769669054465088,37498763526276128,37498762989405216,37498764063147040,37498764331582496,37498760573486112,36841372954657856,36841376981189696,37498748493890592,37498748493890593,36841391745139776,37498754936341536,37498756278518816,37498757620696096,37498750372938784,37498753057293344,36841394966365248,37498750641374240,35956063794627488,35956060841837472,36769636213064768,36769639971161152,36769644266128448,35956051983467424,36769640508032064,35956043930403744,36769634602452032,36769634870887488,36769656882594880,35956036414210976,35956039098565536,36769654735111232,36769655003546688,36769661445997632,36769659030078528,36769660640691264,36769648561095744,36769646413612096,36769671109674048,36769662788174912,36769663861916736,36769666009400384,36769667620013120,36769668693754944,36841347176465472,36841351739868224,36841364087899200,37498765011059744,37498762595140640,37498764742624288,37498765279495200,37498765816366112,37498758568608800,37498760179221536,37498764742624289,37498765816366113,36841377778107456,36841378851849280,37498748368061472,37498755615818784,37498755884254240,37498757494866976,37498752394593312,37498752663028768,37498753199899680,37498755615818785,35956064339887008,35956061118661536,35956058702742432,35956058971177888,35956060313355168,36769636489888832,35956053870904224,36769639979549760,35956054407775136,35956055749952416,35956049307501472,36769641858597952,36769641321727040,36769641053291584,35956046354711456,35956046623146912,35956044475663264,36769635147711552,36769633805534272,36769634342405184,35273370597589120,36769656354112576,36769653669758016,36769654475064384,36769655011935296,36769657964725312,35956035617293216,36769659306902592,36769660380644416,36769658233160768,36769658501596224,36769644542952512,36769645885129792,36769646153565248,35273373550379136,36769649374790720,36769651253838912,36769651522274368,36769671386498112,36769662259692608,36769662528128064,36769664675611712,36769664944047168,36769665749353536,36841343946851392,37498763140400160,37498762871964704,37498763677271072,37498764214141984,37498765556319264,37498765824754720,36841384480605248,37498760187610144,36841396291765312,36841396828636224,37498748108014624,37498748913320992,37498749450191904,37498756429513760,37498749718627360,37498752671417376,35956061932356512,35956058711131040,35956056295211936,36769639417513024,36769639954383936,36769640491254848,36769643175609408,36769642638738496,35956049852760992,35956047705277344,35956042873439136,35956041799697312,36769656865817664,36769655792075840,36769653644592192,36769654986769472,36769655255204928,36769655523640384,36769658744865856,36769660355478592,36769660892349504,36769652302414912,36769651228673088,36769648812753984,36769651497108544,36769649349624896,36769670556025920,36769671361332288,36769661697655872,36769668676977728,36769669750719552,36769670019155008,36841367829218368,37498763685659680,37498765833143328,37498762880353312,37498765296272416,37498758585386016,36841383666910272,36841383935345728,37498761001305120,37498762880353313,37498747579532320,37498747847967776,37498749458580512,37498754021983264,37498754558854176,37498756706337824,37498752411370528,37498753216676896,35956058182648736,35956058987955104,36769636473111616,36769639157466176,36769638620595264,36769638083724352,36769638352159808,36769637546853440,35956052813939616,36769642110256192,36769641841820736,36769641304949824,36769640768078912,36769641036514368,35956045297746848,35956047176795040,36769633520321600,36769633788757056,36769657142641728,35956036439376800,35956039123731360,36769655532028992,35956037513118624,36769653384545344,36769657947948096,36769659290125376,36769659558560832,36769660363867200,36769645868352576,36769647747400768,36769646136788032,36769652042368064,36769671101285440,36769661974479936,36769662242915392,36769662511350848,36769662779786304,36769664927269952,36769665195705408,36769666269447232,36769667343189056,36841347956606016,36841361915249728,37498762888741920,37498763157177376,37498763694048288,37498763694048289,37498758325339168,37498761009693728,37498761278129184,37498761546564640,37498747319485472,37498754030371872,37498754298807328,37498755372549152,37498756446290976,37498758056903712,37498750272275488,37498750540710944,35956063224202144,35956061076718496,35956061345153952,36769639736280128,35956056781751200,35956053828961184,36769640541586496,35956052755219360,36769644299682880,36769642420634688,36769642689070144,35956046312768416,35956044433720224,36769634636006464,36769653158052928,35956038528140192,35956038796575648,36769657453020224,36769659063632960,36769661211116608,36769645910295616,36769646447166528,36769650742133824,36769651010569280,36769652352746560,36769671143228480,36769665506083904,36769662821729344,36769663090164800,36769663895471168,36769664163906624,36769666579825728,36769666848261184,36769667385132096,36769668727309376,36841365396522048,37498763702436896,37498765849920544,37498758602163232,37498758870598688,37498761554953248,37498762091824160,36841372375843904,36841398682518592,37498748401615904,37498749475357728,37498756991550496,37498757796856864,37498756723115040,37498754307195936,37498755112502304,37498756186244128,37498753233454112,37498754307195937,35956061890413472,35956062695719840,35956063501026208,36769639207797824,35956056253268896,36769636791878720,36769637328749632,36769638670926912,36769638402491456,35956053300478880,36769640013104192,35956049273947040,36769643502765120,36769644039636032,36769643771200576,35273382442303616,36769641086846016,35956049542382496,36769641892152384,35956046052721568,35956043368367008,36769635181265984,35956036657480608,36769654508618816,36769654777054272,36769656387667008,35956035315303328,36769657998279744,36769659072021568,36769646187119680,36769646992426048,36769652092699712,36769649139909696,36769649408345152,36769650482086976,36769651287393344,36769652629570624,36769652898006080,36769670346310720,36769661756376128,36769664440730688,36769668467262528,36841363509085248,36841357335069760,36841360824730688,37498764247696416,37498765053002784,37498761831777312,37498761563341856,37498760489600032,37498760758035488,37498760221164576,37498758342116384,37498759147422752,37498759952729120,36841397868823616,37498748410004512,37498748946875424,36841400821613632,37498748946875425,37498754315584544,37498755389326368,37498757805245472,37498751362794528,37498752973407264,37498753778713632,35956062167237536,35956063777850272,35956058409141152,35956055993222048,36769636229841984,36769639451067456,36769637035148352,35956052503561120,35956050087642016,36769643477599296,36769640524809280,36769644282905664,35956051429819296,36769642672292928,35956047671722912,35956044450497440,36769635692971072,36769634887664704,36769634619229248,36769635424535616,35956037202740128,36769653141275712,36769659046855744,36769661462774848,35273379766337664,36769648577872960,36769645893518400,36769646430389312,35273373055451264,35273376545112192,36769661999645760,36769662804952128,36769663073387584,36769663878693952,36769664684000320,36769665757742144,36769666294613056,36769667636790336,36769668710532160,36841346857698368,36841362426954816,36841356252939328,37498762645472288,37498764524520480,37498759424246816,37498759692682272,37498760229553184,37498761840165920,36841373432808512,37498747613086752,37498749223699488,37498747613086753,36841391417984064,37498754055537696,37498755666150432,37498756203021344,37498756471456800,37498757545198624,36841395712951360,37498751908054048,37498752713360416,37498752981795872,37498753518666784,37498755666150433,36769639191020608,36769638654149696,36769636506666048,36769637311972416,36769641338504256,35956049559159712,36769640264762432,36769644022858816,36769641875375168,36769641070068800,35956050632901536,35956050901336992,36769642143810624,36769635164488768,36769633822311488,35956039627047840,35956037479564192,35956037747999648,36769655028712512,36769655834018880,35956035868951456,36769658518373440,36769659323679808,36769660128986176,35273373600710784,36769650465309760,36769661739598912,36769662276469824,36769662544905280,36769668450485312,36769669255791680,36769670061098048,36841347117745216,36841353291760704,36841355170808896,36841357855163456,37498761311683617,37498764801344544,36841385504015424,37498758895764512,37498761311683616,37498761580119072,36841373155984448,37498749232088096,36841390067418176,37498754332361760,37498755942974496,36841394899256384,37498750305829920,37498751648007200,35956057553503136,35956059432551328,36769640172487744,36769636414391360,36769639904052288,36769637756568640,36769639635616832,36769640440923200,35956052990100384,36769641246229568,35273382467469440,36769642319971392,35956051379487648,36769642588406848,36769643125277760,35956048158262176,35956047352955808,35956046010778528,36769633998472256,36769635877520448,36769653325825088,36769655473308736,36769656278615104,35273367703519360,36769657620792384,36769658157663296,36769659231405120,36769660305146944,36769661647324224,36769648225551424,36769646614938688,36769647688680512,35273373340663936,36769650641470528,36769663257936960,36769663526372416,36769665942291520,36841356504597568,36841382811272256,37498763870209056,37498758769935392,36841374489773120,37498755280274464,37498757159322656,37498757427758112,37498757696193568,36841394085561408,37498750180000800,37498753132790816,37498755280274465,37498757427758113,35956063467471776,36769639107134528,36769642059924544,36769642865230912,35956049508828064,35956049777263520,35956047898215328,35956044408554400,36769634812167232,36769634543731776,36769656018568256,36769656555439168,36769655750132800,35273370664697984,35956039845151648,35956038234538912,36769653871084608,35273365295988864,35956035281748896,36769658702922816,36769646891762752,36769645281150016,36769646086456384,35273373885923456,36769650381423680,36769651992036416,36769653065778240,36769670782518336,36769671050953792,36769671319389248,36769662461019200,36769664071631936,36769664340067392,36769664608502848,36769668635034688,36769670245647424,36841344685048896,36841355154031680,36841380923835456,37498759583630369,37498763073291296,37498763610162208,37498765220774944,37498765757645856,37498759583630368,37498760925807648,37498763610162209,37498748577776672,37498748846212128,37498749114647584,37498749114647585,37498749651518497,37498753141179425,37498755020227616,37498749651518496,37498752067437600,37498752335873056,37498753141179424,35956053543748512,35956055691232160,36769639887275072,36769637202920512,36769637739791424,36769640424145984,35956052201571232,36769643108500544,36769642303194176,36769641766323264,35956045490684832,35956046027555744,35956046295991200,35956040390411168,36769634787001408,35956037974492064,36769653309047872,36769656261837888,36769660288369728,36769661093676096,36769661630547008,36769659214627904,36769660019934272,36769646598161472,36769645792855104,36769648208774208,36769646866596928,36769647671903296,36769651429999680,36769651698435136,36769650087822400,36769662167417920,36769662704288832,36769664046466112,36769666999256128,36769667536127040,36841365077754944,36841354071901248,37498764155421728,37498765766034464,37498763081679904,37498762813244448,37498765497599008,37498760128889888,37498761202631712,36841374472995904,37498747243988000,37498747780858912,37498748586165280,37498749391471648,37498747243988001,36841391115994176,37498754223309856,37498754760180768,37498750465213472,37498752344261664,37498752612697120,37498753686438944,35956063484248992,35956063752684448,35956061336765344,35956060531458976,35956058115539872,35956054357443488,36769636942873664,36769639090357312,36769638553486400,35956054894314400,35956052746830752,36769643653760064,35956051136218016,36769634526954560,36769635332260928,36769633721648192,35956042814718880,36769655733355584,35273371755217024,35956036909138848,35956037714445216,36769654122742848,36769657880839232,36769658686145600,36769660833629248,36769648754033728,36769646069679168,36769646338114624,36769646874985536,36769649559340096,36769651975259200,36769653049001024,36769661907371072,36769665128596544,36841350305416256,36841379833316416,37498765774423072,37498760942584864,37498762284762144,37498748057682976,37498749399860256,37498751815779361,37498755842311200,37498756647617568,37498757452923936,37498751815779360,36769636179510336,35956053493416864,35956057251513248,36769639669171264,36769639400735808,36769644232574016,36769643427267648,36769643158832192,35956044098175904,36769635642639424,35956043561304992,35956041413821344,35273369079251072,35956039534773152,36769654433121344,36769655238427712,36769655506863168,36769660338701376,36769647990670400,36769648795976768,35273372568912000,36769651211895872,36769652285637696,36769652554073152,36769664902104128,36769666781152320,36769669197071424,36841362913494080,36841369355945024,36841370429686848,36841359423833152,37498762830021664,37498765514376224,37498763098457120,37498764440634400,36841379288056896,37498762561586208,36841380093363264,37498763366892576,37498762024715297,37498762293150753,37498759340360736,37498762024715296,37498762293150752,37498749408248864,37498755850699808,37498756656006176,37498750750426144,37498752629474336,35956059944256416,36769637530076224,36769638066947136,35956056186160032,36769636456334400,36769638335382592,35956056454595488,36769639140688960,35956049206838176,35956048938402720,35956052428063648,36769643972527168,36769641019737152,36769640751301696,35273381972541568,36769641288172608,35956048133096352,35956047596225440,35956046790919072,35956039006290848,36769654441509952,36769656588993600,35273365597978752,35956035516629920,36769661152396352,36769647730623552,36769646120010816,36769647193752640,35273376066961536,36769652025590848,36769670547637312,36769662494573632,36769664910492736,36769668131718208,36769668400153664,36841346262107200,36841349214897216,36841368005379136,36841358610138176,36841382232458304,37498763643716640,37498763912152096,37498764449023008,37498761496232992,37498762033103904,37498758275007520,37498759617184800,37498760959362080,37498761227797536,36841373910959168,36841399680762944,37498754516911136,37498753174733857,37498754785346592,37498755053782048,37498756395959328,37498757201265696,37498758006572064,37498749953508384,37498752637862944,37498750490379296,37498750758814752,37498752100992032,37498752369427488,37498753174733856,35956061831693216,35956061294822304,35956058610467744,35956060489515936,36769637236474944,36769637773345856,36769639920829504,36769638847087680,35956056462984096,36769636699604032,36769641799877696,36769643142054976,36769643410490432,35273383054672000,36769642336748608,36769641263006784,35956047873049504,35956045994001312,35956041430598560,35956041699034016,36769654953215040,36769655221650496,36769654684779584,36769657100698688,35273368290721920,36769655490085952,36769654416344128,35273367753851008,35956035525018528,36769657637569600,36769658711311424,36769660321924160,36769660590359616,36769661664101440,36769644752667712,36769647705457728,36769648242328640,36769650658247744,36769651463554112,36769662200972352,36769663274714176,36769665153762368,36769665959068736,36769666764375104,36769667569681472,36769667838116928,36769669180294208,36769669448729664,36841345716847680,36841363433587776,36841365849506880,36841366386377792,36841382760940608,37498761504621601,37498763652105248,37498764457411616,36841385176859712,36841385445295168,37498759357137952,37498761504621600,37498747814413344,37498748082848800,37498748888155168,37498755599041568,37498755867477024,37498756672783392,37498751572509728,37498752109380640,37498752914687008,37498755867477025,35956063450694560,35956059961033632,36769640197653568,36769639123911744,36769638050169920,35956048955179936,35273381184012416,36769640734524480,35273383331496064,35956051639534496,35956052444840864,35956047613002656,35956040633680800,35956044391777184,35956041975858080,35273370178158720,36769657377522752,36769658451264576,36769660867183680,36769661135619136,36769645834798144,36769648787588160,36769652008813632,35273362125095040,36769663283102784,36769665699021888,36769668383376448,36841362619892800,36841367451731008,36841367988601920,36841355372135488,36841383289422912,37498758560220193,37498764734235680,37498765271106592,37498758828655649,37498762586752032,37498763928929312,37498758560220192,37498758828655648,37498760439268384,37498761781445664,37498762049881120,36841378726020160,36841400200856640,37498747285931040,37498748091237408,37498758023349280,37498755070559264,37498755338994720,37498756144301088,37498756949607456,37498757754913824,37498753459946528,37498751849333792,37498756144301089,37498752386204704,37498750238721056,37498752923075616,37498750775591968,37498751044027424,37498751580898336,37498755338994721,35956063660409760,35956064197280672,36769636347282496,36769636884153408,36769637152588864,36769639836943424,36769640373814336,36769644131910720,35956050775507872,36769641447556160,36769642521297984,35956051580814240,36769640910685248,36769641179120704,35956047822717856,35956047554282400,36769635005105216,36769634736669760,36769653258716224,36769653527151680,36769655406199872,36769656479941696,35273367502192768,35956035206251424,36769658090554432,36769658358989888,36769658895860800,36769661043344448,36769645205652544,36769646547829824,36769649500619840,36769649769055296,35273360522870912,36769662922392640,36769663727699008,36769665606747200,36769668291101760,36769668559537216,36769669364843584,36841349458166848,36841354021569600,36841355632182336,36841357242795072,37498765413712928,37498760313439265,37498763803100192,37498764071535648,37498764876842016,37498761655616544,37498765413712929,37498759508132896,37498760313439264,37498762192487456,37498764071535649,36841376838583360,36841378986067008,36841399924032576,37498748233843744,37498748502279200,37498749307585568,37498754139423776,37498754676294688,37498757897520160,37498749576021024,37498750112891936,37498750918198304,37498751991940128,35956063937233824,35956055884170144,35956056957911968,36769639040025664,35956055615734688,36769638503154752,36769642261251136,35273383348273280,36769643066557504,36769643603428416,36769643871863872,36769640650638400,35956046488929184,36769635818800192,35956041388655520,36769633671316544,35956042999268256,36769654072411200,36769657025201216,36769657562072128,35273365631533184,36769658904249408,36769659172684864,35273366168404096,35956035483075488,36769648166831168,36769647629960256,36769647898395712,36769646019347520,36769646287782976,36769650851185728,36769651119621184,36769652998669376,36769665883571264,36769661857039424,36769665346700352,35273362141872256,36769664272958528,36769662125474880,36769663736087616,36769666152006720,36769666957313088,36841367434953792,36841354550051904,36841354818487360,37498762469311520,37498762737746976,37498764079924256,36841386225435712,37498760321827872,37498760590263328,37498748242232352,37498749047538720,37498748242232353,37498756026860576,37498756295296032,37498757100602400,37498757369037856,37498757637473312,37498749584409632,37498749852845088,37498750389716000,37498750926586912,37498752268764192,35956058308477856,35956059919090592,35956055355687840,36769637404247104,36769637672682560,36769641430778944,36769640357037120,35956050523849632,35956050792285088,36769641967649856,36769644115133504,35956048644801440,35956045155140512,35956044081398688,36769634719892544,35956043276092320,36769634451457088,36769655926293568,35273371545501824,36769656463164480,36769654584116288,36769655389422656,35273367518969984,36769658073777216,36769644652004416,36769645188875328,36769645725746240,36769646531052608,36769650289148992,35273375035162752,35273372887679104,36769652436632640,36769652168197184,36769662905615424,36769663174050880,36769664247792704,36769668274324544,36841347025470528,36841347293905984,36841366889694272,36841361789420608,37498762746135584,37498763014571040,37498763551441952,37498765162054688,37498759256474656,37498759793345568,36841373063709760,36841398833513536,37498747445314592,37498747713750048,37498748787491872,37498747713750049,37498756035249184,37498757108991008,36841393196368960,37498749592798240,37498750398104608,37498751740281888,35956062343398304,35956064222446496,35956060195914656,35956059122172832,35956054290334624,36769638754812992,36769636607329344,35956055095640992,36769644391957568,35956049190060960,36769643049780288,35956051069109152,36769642244473920,36769641170732096,36769640633861184,35956048384754592,36769633654539328,35956042747610016,35956037378900896,36769657008424000,36769654324069440,36769655666246720,36769656203117632,35956035499852704,36769659692778560,36769661303391296,36769661571826752,35273378801647744,35273380680695936,36769647076312128,36769647613183040,36769648955360320,36769649223795776,36769650834408512,36769670698632256,36769671235503168,36769661840262208,36769662108697664,36769664256181312,36769667208971328,36841382450562112,37498758191121441,36841387550835776,37498758191121440,37498759801734176,37498762217653280,37498747990574112,37498753896154144,37498754701460512,37498755238331424,37498755506766880,37498756312073248,37498757654250528,37498751480235040,35956063626855328,35956061479371680,36769640138933312,35956053694743456,36769637186143296,36769639333626944,36769638259885120,36769644165465152,36769641212675136,35956047520727968,35956045373244320,36769635038659648,35956042420454304,36769634501788736,35956041346712480,35956042152018848,35273368877924480,35956037588616096,35956038930793376,36769657050367040,35956038393922464,36769653560706112,36769654366012480,35273364046086272,36769660271592512,36769661076898880,36769646849819712,36769648997303360,35273374783504512,36769650607916096,36769651950093376,35273360556425344,36769662419076160,35273357335199872,36769669398398016,36841366872917056,36841358551417920,37498761152300065,37498763836654624,37498765715702816,37498759273251872,37498759541687328,37498760883864608,37498761152300064,36841377341899840,36841398816736320,36841399353607232,37498747193656352,37498748535833632,36841400695784512,37498754441413664,37498755246720032,37498756052026400,37498757931074592,37498749609575456,35956062024631200,35956057729663904,36769639073580096,36769638536709184,36769636926096448,36769642294805568,36769643636982848,36769640684192832,35956047797552032,35956042965713824,35956041355101088,36769633704870976,35956042428842912,36769635047048256,35956036254827424,35273369691619456,36769655179707456,36769656790320192,36769657327191104,35956035449521056,36769659743110208,36769660011545664,36769661353722944,35273378818424960,36769652763788352,36769663769642048,36769666185561152,36769667259302976,36769667527738432,36769667796173888,36841345926562880,36841381091607616,36841382433784896,37498763308172320,37498763576607776,37498764113478688,37498764650349600,37498758476334112,37498760086946848,37498761160688672,37498762234430496,37498747202044960,37498749081093152,37498753107624993,37498753912931360,37498754718237728,37498754986673184,37498756865721376,37498749617964064,37498749886399520,37498752570754080,37498752839189536,37498753107624992,35956064180503456,35956061496148896,35956060959277984,36769639853720640,36769636364059712,36769637437801536,36769644148687936,36769641195897920,35956050490295200,35956051564037024,36769635021882432,36769634485011520,36769635558753344,36769653543928896,36769656228283456,36769658107331648,36769660523250752,36769661060121664,35273379632119936,36769650322703424,36769650859574336,36769670455362624,36769663476040768,36769664012911680,36769666965701696,36769668307878976,36841357997769792,37498762779690016,37498764390302752,36841384304444480,37498761705948192,37498762242819104,37498762779690017,37498747210433568,37498748552610848,36841391283766336,37498754995061792,37498756874109984,37498757410980896,35956057478005664,35956059088618400,36769639325238336,35956057209570208,35956056135828384,36769639056802880,36769638788367424,36769637983061056,36769638519931968,36769640667415616,36769643620205632,36769643888641088,35956049961812896,35956050767119264,36769642009592896,35956044056232864,36769635567141952,36769634761835584,36769655162930240,36769655699801152,36769657310413888,35273365681864832,35273366487171200,35956035466298272,36769659994768448,36769645230818368,35273377224589440,36769646036124736,36769647378302016,36769647646737472,36769670463751232,36769663752864832,36769665363477568,36769666168783936,36769669121573952,36769669926880320,36769670195315776,36841370068976704,36841357989381184,36841360942171200,36841361210606656,37498762519643168,37498763593384992,37498763861820448,37498764130255904,37498764398691360,37498765740868640,37498758493111328,37498760640594976,37498761714336800,37498761982772256,36841371411153984,36841376511427648,36841397986264128,37498747487257632,37498755808756768,37498756345627680,37498750171612192,37498750708483104,37498752855966752,37498753124402208],\"product_nonkey_property\":[232323,232322,232321,232320,232327,232326,232325,232324,232329,232328],\"product_key_property\":[553944,553945,553946,553947,553948,553949,553939,553940,553941,553942,553943],\"product_score\":[26819],\"product_property_range\":[144,162,148,150,151,152,154,155,158,143],\"product_sale_property\":[53250,53279,40993,53285,53291,41009,16437,53306,53314,41038,16481,41062,16492,53357,16502,53367,53374,53381,41095,41096,41098,41099,41102,41104,41106,53402,16548,53416,41132,41142,53438,53444,41159,41169,41178,53466,41179,53468,53471,16613,16618,41200,41204,41208,41214,41216,53509,41227,41234,53523,41240,53531,53540,41253,16678,53548,41275,16704,41280,41281,16706,41283,41284,53580,41293,41294,41295,53586,41300,41301,41303,41305,41307,41310,41312,53606,53611,53617,53649,53658,53663,53668,41389,53681,41396,53686,53690,41406,53695,41411,53699,53704,41417,53710,53715,41434,41436,41438,41441,53737,53746,53753,41466,41467,41472,41484,53779,53785,53791,41515,41522,53811,53814,53818,53822,53828,53832,41545,53842,53848,53862,41576,41580,53868,53884,53887,53893,53901,53914,41628,53918,53921,41634,41639,53929,53934,53938,41653,53945,53949,53954,41670,41677,53968,41686,53976,41690,53990,41704,53993,53996,41709,54001,41715,41718,54007,41722,54012,54015,54018,41731,41736,54028,54033,54039,54041,54043,54046,41765,54053,41770,54060,54068,54070,54071,54073,54074,54077,54079,54089,54091,41805,54095,54096,54101,54103,54105,54113,54118,54119,54127,41840,54129,54130,54131,54136,54137,54139,54140,54143,54145,41860,54149,54152,54156,54161,54163,54165,41878,41880,54171,54177,54184,41898,54188,54189,41908,54197,41911,54203,54205,41918,54207,54209,41922,41929,54217,54219,54220,54223,54224,54225,41940,54228,54229,41942,54230,41943,54232,54234,54235,54236,54238,41951,54239,54240,54242,54243,41956,54244,54245,54246,41961,54249,54250,41963,54251,54254,54256,41969,54258,54260,41973,54267,54268,54270,54273,54274,41988,54276,54278,54280,41994,54282,54283,41996,54284,54285,54286,54287,54288,42001,54292,54293,54295,54296,54297,42010,42011,54299,42012,54301,54302,42017,54308,54310,42025,54313,42027,54315,54316,54319,54320,54322,54325,54329,42046,54335,42053,42059,54347,58443,54350,54351,58447,54353,58449,42067,42068,54357,42072,54364,58461,58463,42081,58465,54371,42084,58471,54376,58472,58474,58475,58478,58481,42098,58484,58489,58492,58498,42116,58501,58503,54420,54421,58518,42136,42137,54425,42143,54435,42148,42150,58536,54443,54444,42161,42162,42166,54454,54459,42176,54464,54470,54473,42186,58572,58574,42192,42199,42203,54491,54494,42211,58600,42218,58602,42221,42226,42227,54518,58615,58617,58621,58628,58629,58631,58634,58635,58639,54544,58641,58642,42259,58643,58645,58646,58649,58650,42267,58651,58656,42273,54562,58658,58659,58661,58662,42281,58666,54572,58670,58675,58677,58678,13623,58682,58687,58696,58699,54605,42320,58705,54615,58711,58714,58715,58717,58720,42338,58722,58726,54634,54638,54644,58745,58749,54657,58753,58755,42372,54661,58763,58764,54673,58772,54677,58773,58780,58782,58786,58788,54693,58789,13735,54698,54703,58802,58803,58808,54713,58812,42430,54725,58821,58826,13776,58837,58841,42460,50661,58854,58856,58858,58861,42480,50673,54769,58866,50677,58871,58872,42489,50681,54777,58873,58876,50685,54782,50688,58882,50691,50692,42501,54791,50697,50698,50699,50700,58892,58896,50705,54801,54803,58899,54805,50711,58906,42523,50715,50718,50719,54815,50722,54818,58915,50724,54820,58919,50728,50729,50732,50734,58927,50736,58928,58929,50738,58931,42548,50740,58932,50741,50744,58936,50746,50748,58940,50750,50751,50753,50754,58946,50755,50756,58948,50758,58950,50759,50760,50762,50763,58955,42575,58959,50768,50769,58962,58964,50773,50774,58966,58967,42586,50778,50779,58971,50780,58972,50781,50783,50785,58980,50790,42599,50791,50794,58986,42605,50801,50803,58995,50804,42614,42615,50807,58999,50808,50809,50810,50811,50813,50814,50816,50818,59013,50823,50825,59017,59018,42635,42639,59023,50836,59032,50845,50848,13985,42657,13988,59045,50857,50862,50867,59060,59061,42681,59070,42688,50881,59074,59075,42694,50889,59082,42699,50893,50900,50908,59103,42720,50912,59104,42725,59109,50918,42729,59118,59120,50930,50933,59125,50936,50938,59132,50942,50946,59138,50947,42757,50949,50950,50951,50953,50954,50955,42764,59149,50958,59150,50960,50962,50963,50964,50965,42774,50967,59160,50970,59162,42779,59164,50973,59165,50974,59167,50978,50979,59171,50980,59172,50982,59174,50983,50984,50985,59177,59182,50995,51000,42812,51004,42816,51011,42820,51013,42824,51020,42829,42833,42835,51027,42836,42842,42848,42849,42862,42863,51056,42868,42870,51067,42880,51072,42881,51076,42887,51082,51088,51095,51102,42911,14242,42914,42915,14245,51109,42922,42926,42927,51127,42940,51134,42945,51141,42952,42966,51174,42984,51180,42990,51195,51199,51210,43028,51221,43032,43034,43039,51233,14375,51239,43048,43054,43060,51253,51258,43067,43071,43072,43079,51271,43080,51275,51285,43099,51291,43103,51296,43106,43107,43108,43117,51310,51315,43129,51321,51328,51333,51347,51359,43169,43176,51368,51376,51390,14530,51409,43226,51421,51425,51433,43243,51438,14585,43259,51452,14592,43265,51457,51461,14603,51467,43284,43290,43294,43297,51489,51494,51498,43312,51504,43318,51511,51518,51521,43330,14667,43339,51535,51552,43362,43371,43374,14705,51577,51581,51587,51591,51597,51601,43413,51616,51622,51626,51632,14775,51641,51644,43455,43458,51651,51657,43468,51662,51666,51674,43487,51679,51681,51688,51692,51738,51742,51756,51759,51763,51769,51774,51783,51792,51807,51813,51823,14962,14964,51834,14986,14991,51856,51858,51866,51873,51878,51881,51887,51890,51893,51896,15036,51901,51910,51915,15057,51921,51924,15069,51933,51936,51944,51955,51960,51963,51966,51972,64261,64262,51975,64263,64264,64265,51978,64266,64267,51980,64268,64269,15118,64270,64271,51984,64272,64273,64274,64275,51988,64276,64277,64278,51991,64279,64280,64281,51994,64282,64283,15132,64284,64285,64286,64287,64288,64289,52002,64290,52003,64291,64292,64293,64294,52007,64295,64296,52009,64297,64298,64299,64300,64301,64302,52015,64303,52016,64304,64305,52018,64306,64307,52020,64308,64309,64310,64311,64312,64313,52026,64314,64315,52028,64316,64317,64318,64319,64320,52033,64321,64322,64323,64324,52037,64325,64326,64327,52040,64328,64329,64330,64331,64332,64333,64334,15183,52047,64335,64336,64337,64338,64339,64340,64341,52054,64342,64343,52056,64344,15193,64345,52058,64346,64347,64348,64349,52062,64350,64351,52064,64352,64353,52066,64354,64355,64356,52069,64357,64358,52071,64359,64360,64361,52074,64362,64363,52076,64364,52077,64365,52078,64366,52079,64367,64368,64369,52082,64370,52083,64371,64372,64373,64374,64375,52088,64376,64377,64378,52091,64379,52092,64380,64381,52094,64382,52095,64383,64384,64385,64386,52099,64387,64388,64389,64390,64391,64392,64393,64394,52107,64395,64396,52109,64397,15246,64398,52111,64399,52112,64400,52113,64401,64402,52115,64403,52116,64404,52117,64405,52118,64406,52119,64407,52120,64408,52121,64409,64410,52123,64411,52124,64412,64413,52126,64414,52127,64415,52128,64416,52129,64417,64418,64419,52132,64420,52133,64421,52134,64422,64423,52136,64424,52137,64425,64426,52139,64427,52140,64428,64429,52142,64430,52143,64431,52144,64432,64433,52146,64434,64435,52148,64436,52149,64437,64438,64439,52152,64440,52153,64441,52154,64442,52155,64443,52156,64444,52157,64445,52158,64446,64447,64448,52161,64449,15298,52162,64450,64451,64452,64453,52166,64454,52167,64455,15304,64456,64457,52170,64458,52171,64459,52172,64460,52173,64461,64462,52175,64463,52176,64464,15313,52177,64465,64466,52179,64467,52180,64468,52181,64469,64470,64471,64472,64473,52186,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,52209,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,15386,52250,64538,64539,64540,64541,64542,52255,64543,64544,64545,64546,64547,64548,52261,64549,64550,64551,64552,64553,52266,64554,64555,64556,64557,64558,64559,64560,52273,64561,64562,15411,52275,64563,64564,52277,64565,64566,64567,64568,64569,64570,64571,52284,64572,64573,64574,52287,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,52307,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,52321,64609,64610,15459,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,52336,64624,64625,64626,64627,64628,64629,64630,52343,64631,64632,64633,15482,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,52367,64655,64656,64657,64658,64659,64660,15509,64661,64662,64663,64664,64665,64666,64667,64668,64669,52382,64670,64671,64672,64673,64674,64675,64676,52389,64677,64678,64679,64680,52393,64681,64682,64683,64684,64685,64686,64687,64688,15537,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,52413,64701,64702,64703,15552,64704,64705,15554,52418,64706,64707,64708,52421,64709,64710,64711,15560,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,15579,64731,64732,64733,64734,64735,64736,15585,64737,52450,64738,64739,64740,64741,64742,52455,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,52467,64755,64756,64757,64758,64759,64760,52473,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,15622,64774,64775,52488,64776,52495,52500,52502,52511,52513,52515,52519,52522,52528,52531,52543,52545,52550,52555,52560,52562,52566,52567,52572,52582,52593,52597,52598,52602,52607,15749,52614,52617,52622,52627,52631,52633,52637,52641,52644,52646,52648,40368,15797,52661,52665,40379,52668,40383,52671,40387,52678,40391,52679,52683,40396,40397,52686,40400,40401,40402,40403,40405,52693,52698,52702,40416,52705,52711,52716,52724,52732,40447,52736,52738,52741,52744,52745,52748,52752,52760,52762,52764,52767,52770,52775,52781,52788,52794,15934,52799,52802,52804,40521,52809,52811,52813,52815,52818,52824,52827,52829,52834,52840,40553,52843,52845,40558,52847,40560,40565,52853,40568,52857,15995,52870,52880,52882,52883,52884,52885,52886,40599,52888,52889,52890,52891,40604,52892,52894,52896,52898,52899,52901,52902,52903,52906,52908,52909,52910,52911,52914,16051,52915,52916,40629,52917,52918,52921,52923,52924,52926,52927,52928,52929,52930,40643,52933,52935,52937,52939,52940,16077,52943,52946,52947,52948,52950,40665,52954,52956,52958,40671,52959,52960,52962,52964,52965,52966,40680,52969,52971,40686,52975,40688,52976,52979,40692,52980,52981,52983,52984,52985,52986,52988,52989,52990,40703,40705,52993,52995,52998,53000,53003,53008,53011,53013,40728,16154,53019,53023,53025,40745,53034,53051,16188,40764,53060,53066,16204,16206,40785,53073,53080,53083,40800,53092,53096,53100,53111,40826,53123,40840,40849,53143,40861,40865,40867,53159,53168,16308,53172,16324,53188,40902,40908,53205,40918,40924,40927,53226,40943,53235,53240]}".length());
  }

  @Test
  public void test11() {
    System.out.println(urlEncode("Type:markland AND cityid:1 " ));
    System.out.println(urlEncode("Type:markland AND cityid:1 AND ( keyword:\"故宫\" )"));
  }

  public static final String SIHP_LIS_APP_CITY_URL_8230
          = "/rn_ship/main.js?CRNType=1&CRNModuleName=ship_CQ_rn&from=ship_rn&initialPage=ShiplineView&fromCity=%s&utmSource=Ctrip_search&comeFrom=outSide";


  private double getDistance(double lon, double lat, double productlon, double productlat) {
    double lon1Val = lon;
    double lat1Val = lat;
    double lon2Val = productlon;
    double lat2Val = productlat;

//    if(!GeoUtils.isValidLat(lat1Val)||!GeoUtils.isValidLat(lat2Val)
//            ||!GeoUtils.isValidLon(lon1Val)||!GeoUtils.isValidLon(lon2Val))
//      return -1;

    double diffLon = Math.abs(lon1Val - lon2Val);
    if (diffLon > 180) {
      diffLon -= 360;
    }
    return Math.sqrt(Math.pow(diffLon, 2) + Math.pow(lat1Val - lat2Val, 2)) * 110.0;
  }

  public static final String SHIP_LIST_APP_URL =
          "ctrip://wireless/h5?page=index.html#ship/list&path=ship&fromCity=%s&toCity=%s&date=%s&utmSource=globalsearch";
  public static final String SHIP_LIST_APP_URL_8230 =
          "/rn_ship/main.js?CRNType=1&CRNModuleName=ship_CQ_rn&from=ship_rn&initialPage=ShipListView&fromCity=%s&toCity=%s&utmSource=Ctrip_search";

  /**
   * 返回当前日期, Format:2014-10-10
   */
  public static String getTodayWithSplit() {
    return new SimpleDateFormat(YYYY_MM_DD).format(new Date());
  }

  public static final String YYYY_MM_DD = "yyyy-MM-dd";


  public static final String poiranklisthybrid = "/cranking/index.html#cranking/hotUnDestinationDetails/%s.html?districtId=%s&ishideheader=true&isHideNavBar=YES";

  public static final String poiranklisth5 = "https://m.ctrip.com/webapp/you/cranking/hotUnDestinationDetails/%s.html?districtId=%s&ishideheader=true&isHideNavBar=YES";

  public static final String INN_PAGE_URL_8200 = "/rn_bnb_order/main.js?CRNType=1&CRNModuleName=TuJiaApp&initialPage=ProductPage&houseId=%s&channelId=60";

  public static final String DISTRICT_PRO_APP_URL_820 =
          "/rn_destination_home/main.js?CRNModuleName=rn_destination_home&CRNType=1&initialPage=CTDestDestinationPage&hideDefaultLoading=true&districtId=%d";

  //民宿 行政区 和 商圈
  private static String getInnLocationAndZoneSight(int tujiaCityId, String cityName, boolean inchana, String geoid, String word) {
    String format = String.format(INN_LIST_URL_LOCATION_840,
            tujiaCityId, cityName, inchana ? 1 : 2, geoid, word, inchana ? 4 : 10);
    System.out.println(format);
    return String.format(INN_TEMPLATE,
            urlEncode(format));
  }

  /**
   * 民宿 行政区 商圈 景点
   */
  public static final String INN_LIST_URL_LOCATION_840 =
          "https://m.ctrip.com/webapp/inn-v2/list?cityid=%s&cityname=%s&cateid=%s&poi=%s|%s|%s&channelid=61&isHideNavBar=YES";


  //民宿 景点 和 地标
  private static String getInnSightAndMarklandUrl(IndexDoc indexDoc, UrlInfo urlInfo) {
    String format = String.format(INN_LIST_URL_MARKLAND_840,
            urlInfo.tujiaCityId, indexDoc.cityName, indexDoc.inChina() ? 1 : 2,
            indexDoc.lon, indexDoc.lat, indexDoc.word,
            urlInfo.geoId, indexDoc.word, (indexDoc.inChina() ? 4 : 10)
    );
    System.out.println(format);
    return String.format(INN_TEMPLATE,
            urlEncode(format));
  }

  public static final String INN_LIST_URL_MARKLAND_840 =
          "https://m.ctrip.com/webapp/inn-v2/list?cityid=%s&cityname=%s&cateid=%s&pos=%s|%s|%s&poi=%s|%s|%s&channelid=61&isHideNavBar=YES";


  /**
   * 民宿模版
   */
  public static final String INN_TEMPLATE = "/pages/bnb/bnbwebview?url=%s";

  public static String urlEncode(String text) {
    try {
      if (StringUtils.isEmpty(text)) {
        return StringUtils.EMPTY;
      }
      return StringUtils.replace(URLEncoder.encode(text, StandardCharsets.UTF_8.name()), "+", "%20");
    } catch (UnsupportedEncodingException e) {
    }
    return text;
  }

  /**
   * Hybrid格式Url
   */
  public static String getHybridUrl(String url) {
    return String.format(UrlConstants.HYBRID_TEMPLATE_URL, base64Encode(url).replaceAll("[\n\r]", ""));
  }

  /**
   * Rn格式Url
   */
  public static String getRnUrl(String url) {
    return String.format(UrlConstants.REACT_TEMPLATE_URL, base64Encode(url).replaceAll("[\n\r]", ""));
  }

  /**
   * Base64编码
   */
  public static String base64Encode(String url) {
    return Base64.getMimeEncoder().encodeToString(url.getBytes(Charsets.UTF_8)).replaceAll("[\n\r]", "");
  }

  public final class UrlConstants {
    /**
     * Hybrid链接模板
     */
    public static final String HYBRID_TEMPLATE_URL = "ctrip://wireless/h5?url=%s&type=1&isHideNavBar=YES";

    /**
     * ReactNative链接模板
     */
    public static final String REACT_TEMPLATE_URL = "ctrip://wireless/h5?url=%s&type=5";

    /**
     * HTTP 链接模板
     */
    public static final String HTTP_TEMPLATE_URL = "ctrip://wireless/h5?url=%s&type=2";

  }

  static class IndexDoc {

    public String word;
    public String cityName;
    public double lat;
    public double lon;
    public int countryId;

    public UrlInfo urlInfo;

    public boolean inChina() {
      return this.countryId == 1 || countryId == 110000;
    }

  }

  static class UrlInfo {

    public String geoId;
    public int tujiaCityId;

  }

}
